<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
  <style>
    input{
      margin-top: 5px;
      margin-bottom: 5px;
    }
    div{
      width: 200px;
      background-color: cyan;
      padding-left: 10px;
    }
    table{
      text-align: center;
     background-color: darkgrey;
    }
    td{
      border:1px solid skyblue;
    }
  </style>
</head>
<body>
  <div>
    <input type="text" placeholder="请输入员工姓名" id="name"><br>
    <input type="text" placeholder="请输入员工年龄" id="age"><br>
    <input type="text" placeholder="请输入员工工资" id="salary"><br>
    <input type="text" placeholder="请输入员工岗位" id="job"><br>
  </div>
  <input type="button" value="提交" onclick="f()">
<table  border="1px">
  <caption>员工信息表</caption>
  <tr>
    <td>姓名</td>
    <td>年龄</td>
    <td>工资</td>
    <td>岗位</td>
  </tr>
  <script>
    let name=document.querySelector("#name");
    let age=document.querySelector("#age");
    let salary=document.querySelector("#salary");
    let job=document.querySelector("#job");
    let table=document.querySelector("table");
    function f() {
      let tr=document.createElement("tr");
      let nameID=document.createElement("td");
      let ageID=document.createElement("td");
      let salaryID=document.createElement("td");
      let jobID=document.createElement("td");
      nameID.innerText=name.value;
      ageID.innerText=age.value;
      salaryID.innerText=salary.value;
      jobID.innerText=job.value;
      tr.append(nameID,ageID,salaryID,jobID);
      table.append(tr);
    }
  </script>
</table>
</body>
</html>